  /**
   * Generate time : 2012-06-13 16:16:20
   * Version : 1.0.1.V20070717
   */
package com.baosight.sczx.zm.ct.domain;

import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.ep.DaoEPBase;
import java.util.HashMap;
import java.util.Map;
import com.baosight.iplat4j.util.StringUtils;
/**
 * ZMCTSmsModelData 
 *  
 */
public class ZMCTSmsModelData extends DaoEPBase {

	private String fdKeyId = " ";		/* FD_KEY_ID*/
	private String fdModelId = " ";		/* 短信模板ID*/
	private String fdFieldTname = " ";		/* 字段别名*/
	private String fdFieldName = " ";		/* 字段名*/

	/**
	 * initialize the metadata 
	 */
	public void initMetaData() {
		EiColumn eiColumn;
		
	eiColumn = new EiColumn("fdKeyId");
	eiColumn.setPrimaryKey(true);
	eiColumn.setFieldLength(32);	
	eiColumn.setDescName("FD_KEY_ID");
	eiMetadata.addMeta(eiColumn);
	
	eiColumn = new EiColumn("fdModelId");
	eiColumn.setFieldLength(32);	
	eiColumn.setDescName("短信模板ID");
	eiMetadata.addMeta(eiColumn);
	
	eiColumn = new EiColumn("fdFieldTname");
	eiColumn.setFieldLength(50);	
	eiColumn.setDescName("字段别名");
	eiMetadata.addMeta(eiColumn);
	
	eiColumn = new EiColumn("fdFieldName");
	eiColumn.setFieldLength(50);	
	eiColumn.setDescName("字段名");
	eiMetadata.addMeta(eiColumn);
	

	}
	/**
	 * the constructor
	 */
	public ZMCTSmsModelData() {
		initMetaData();
	}
	
	/**
	 * get the fdKeyId - FD_KEY_ID
	 * @return the fdKeyId
	 */
	public String getFdKeyId() {
		return this.fdKeyId;
	}
	
	/**
	 * set the fdKeyId - FD_KEY_ID
	 */
	public void setFdKeyId(String fdKeyId) {
		this.fdKeyId = fdKeyId;
	}
	
	/**
	 * get the fdModelId - 短信模板ID
	 * @return the fdModelId
	 */
	public String getFdModelId() {
		return this.fdModelId;
	}
	
	/**
	 * set the fdModelId - 短信模板ID
	 */
	public void setFdModelId(String fdModelId) {
		this.fdModelId = fdModelId;
	}
	
	/**
	 * get the fdFieldTname - 字段别名
	 * @return the fdFieldTname
	 */
	public String getFdFieldTname() {
		return this.fdFieldTname;
	}
	
	/**
	 * set the fdFieldTname - 字段别名
	 */
	public void setFdFieldTname(String fdFieldTname) {
		this.fdFieldTname = fdFieldTname;
	}
	
	/**
	 * get the fdFieldName - 字段名
	 * @return the fdFieldName
	 */
	public String getFdFieldName() {
		return this.fdFieldName;
	}
	
	/**
	 * set the fdFieldName - 字段名
	 */
	public void setFdFieldName(String fdFieldName) {
		this.fdFieldName = fdFieldName;
	}
	
	/**
	 * get the value from Map
	 */
	public void fromMap(Map map) {
	
		setFdKeyId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdKeyId")), fdKeyId));
		setFdModelId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdModelId")), fdModelId));
		setFdFieldTname(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdFieldTname")), fdFieldTname));
		setFdFieldName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdFieldName")), fdFieldName));
	}
	
	/**
	 * set the value to Map
	 */
	public Map toMap() {
		
		Map map = new HashMap();
			map.put("fdKeyId",StringUtils.toString(fdKeyId, eiMetadata.getMeta("fdKeyId")));	
			map.put("fdModelId",StringUtils.toString(fdModelId, eiMetadata.getMeta("fdModelId")));	
			map.put("fdFieldTname",StringUtils.toString(fdFieldTname, eiMetadata.getMeta("fdFieldTname")));	
			map.put("fdFieldName",StringUtils.toString(fdFieldName, eiMetadata.getMeta("fdFieldName")));	
			
		return map;
	
	}
}